<template>
  <div class="child">
    <h2>子组件</h2>
    {{ title }}
    <button @click="handleChangeTitle">handleChangeTitle</button>
  </div>
</template>
<script>
export default {
  props: ['title'],
  data() {
    return {}
  },
  methods: {
    handleChangeTitle() {
      this.$emit('update:title', '新标题')
    }
  }
}
</script>
<style lang="scss" scoped></style>
